<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>清除浮动_BFC</title>
</head>
<style>
    .outer{
        width:500px;
        background-color:orange;
        overflow:hidden;
    }

    .inner{
        height:300px;
        width:300px;
        background-color:pink;
        float: left;
    }

    
</style>
<body>
    <div class="outer">
        <div class="inner"></div>
    </div>
</body>
</html>